package com.example.yan_music.app;
import android.annotation.SuppressLint;
import android.app.Application;
import android.content.Context;
import android.graphics.Typeface;
import android.util.Log;

import com.example.yan_music.utils.XDataPool;
import com.example.yan_music.utils.XLog;

import org.litepal.LitePal;

import java.lang.reflect.Field;

/**
 *  获取全局的Context
 */
public class XApplication extends Application {
    @SuppressLint("StaticFieldLeak")
    private static Context mContext;

    @Override
    public void onCreate() {
        super.onCreate();
        // 初始化全局Context
        mContext = getApplicationContext();
        // 初始化LitePal
        LitePal.initialize(mContext);
    }

    public static Context getContext(){
        return mContext;
    }

}
